from rest_framework.pagination import PageNumberPagination

class CustomPagination(PageNumberPagination):
    page_size = 10
    page_size_query_param = 'page_size'
    max_page_size = 100
    page_query_param = 'page'

    def get_paginated_response(self, data):
        return {
            'total': self.page.paginator.count,
            'page_size': self.page_size,
            'page': self.page.number,
            'data': data
        }
